package demo2protected;

import demo2.School;


public class Student extends School {

    public Student(String schoolName, int id) {
        super(schoolName, id);
    }

    public static void main1(String[] args) {
        Student s = new Student("幸福中学", 8848);

        System.out.println("学校名称：" + s.schoolName);
        System.out.println("学号：" + s.id);

    }


    public static void main2(String[] args) {

        //final修饰变量 -- 表示该变量变为常量，无法被修改
//        final int a = 10;
//        System.out.println("a = " + a);
//        a = 100;
    }


    public  static void main3(String[] args) {

        //final修饰类 --- 表示该类无法被继承

        Student s = new Student("幸福中学",100);
        System.out.println(s.schoolName);


    }
}
